home *** CD-ROM | disk | FTP | other *** search
Wrap
ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) NNNNAAAAMMMMEEEE ffffggggllllMMMMaaaapppp1111dddd,,,, ffffggggllllMMMMaaaapppp1111ffff - define a one-dimensional evaluator FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN SUBROUTINE ffffggggllllMMMMaaaapppp1111dddd( INTEGER*4 _t_a_r_g_e_t, REAL*4 _u_1, REAL*4 _u_2, INTEGER*4 _s_t_r_i_d_e, INTEGER*4 _o_r_d_e_r, CHARACTER*8 _p_o_i_n_t_s ) SUBROUTINE ffffggggllllMMMMaaaapppp1111ffff( INTEGER*4 _t_a_r_g_e_t, REAL*4 _u_1, REAL*4 _u_2, INTEGER*4 _s_t_r_i_d_e, INTEGER*4 _o_r_d_e_r, CHARACTER*8 _p_o_i_n_t_s ) PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS _t_a_r_g_e_t Specifies the kind of values that are generated by the evaluator. Symbolic constants GGGGLLLL____MMMMAAAAPPPP1111____VVVVEEEERRRRTTTTEEEEXXXX____3333, GGGGLLLL____MMMMAAAAPPPP1111____VVVVEEEERRRRTTTTEEEEXXXX____4444, GGGGLLLL____MMMMAAAAPPPP1111____IIIINNNNDDDDEEEEXXXX, GGGGLLLL____MMMMAAAAPPPP1111____CCCCOOOOLLLLOOOORRRR____4444, GGGGLLLL____MMMMAAAAPPPP1111____NNNNOOOORRRRMMMMAAAALLLL, GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____1111, GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____2222, GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____3333, and GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____4444 are accepted. _u_1, _u_2 Specify a linear mapping of u, as presented to ffffggggllllEEEEvvvvaaaallllCCCCoooooooorrrrdddd1111, to u^, the variable that is evaluated by the equations specified by this command. _s_t_r_i_d_e Specifies the number of floats or doubles between the beginning of one control point and the beginning of the next one in the data structure referenced in _p_o_i_n_t_s. This allows control points to be embedded in arbitrary data structures. The only constraint is that the values for a particular control point must occupy contiguous memory locations. _o_r_d_e_r Specifies the number of control points. Must be positive. _p_o_i_n_t_s Specifies a pointer to the array of control points. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN Evaluators provide a way to use polynomial or rational polynomial mapping to produce vertices, normals, texture coordinates, and colors. The values produced by an evaluator are sent to further stages of GL processing just as if they had been presented using ffffggggllllVVVVeeeerrrrtttteeeexxxx, ffffggggllllNNNNoooorrrrmmmmaaaallll, ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd, and ffffggggllllCCCCoooolllloooorrrr commands, except that the generated values do not update the current normal, texture coordinates, or color. PPPPaaaaggggeeee 1111 ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) All polynomial or rational polynomial splines of any degree (up to the maximum degree supported by the GL implementation) can be described using evaluators. These include almost all splines used in computer graphics: B-splines, Bezier curves, Hermite splines, and so on. Evaluators define curves based on Bernstein polynomials. Define p(u^) as n R n p(u^) = B (u^)R i=0 i i n where R is a control point and B (u^) is the ith Bernstein polynomial of i i degree n (_o_r_d_e_r = n + 1): ( ) n n i n-i B (u^) = | | u^ (1-u^) i (i ) Recall that ( ) 0 n 0 _= 1 and | | _= 1 ( 0 ) ffffggggllllMMMMaaaapppp1111 is used to define the basis and to specify what kind of values are produced. Once defined, a map can be enabled and disabled by calling ffffggggllllEEEEnnnnaaaabbbblllleeee and ffffggggllllDDDDiiiissssaaaabbbblllleeee with the map name, one of the nine predefined values for _t_a_r_g_e_t described below. ffffggggllllEEEEvvvvaaaallllCCCCoooooooorrrrdddd1111 evaluates the one- dimensional maps that are enabled. When ffffggggllllEEEEvvvvaaaallllCCCCoooooooorrrrdddd1111 presents a value u, the Bernstein functions are evaluated using u^, where u - u1_______ u^ = u2 - u1 _t_a_r_g_e_t is a symbolic constant that indicates what kind of control points are provided in _p_o_i_n_t_s, and what output is generated when the map is evaluated. It can assume one of nine predefined values: GGGGLLLL____MMMMAAAAPPPP1111____VVVVEEEERRRRTTTTEEEEXXXX____3333 Each control point is three floating-point values representing x, y, and z. Internal ffffggggllllVVVVeeeerrrrtttteeeexxxx3333 commands are generated when the map is evaluated. GGGGLLLL____MMMMAAAAPPPP1111____VVVVEEEERRRRTTTTEEEEXXXX____4444 Each control point is four floating-point values representing x, y, z, and w. Internal ffffggggllllVVVVeeeerrrrtttteeeexxxx4444 commands are generated when the map is evaluated. GGGGLLLL____MMMMAAAAPPPP1111____IIIINNNNDDDDEEEEXXXX Each control point is a single floating-point value representing a color index. Internal ffffggggllllIIIInnnnddddeeeexxxx commands are generated when the map is evaluated but the current index is not updated with the value of these ffffggggllllIIIInnnnddddeeeexxxx commands. PPPPaaaaggggeeee 2222 ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) GGGGLLLL____MMMMAAAAPPPP1111____CCCCOOOOLLLLOOOORRRR____4444 Each control point is four floating-point values representing red, green, blue, and alpha. Internal ffffggggllllCCCCoooolllloooorrrr4444 commands are generated when the map is evaluated but the current color is not updated with the value of these ffffggggllllCCCCoooolllloooorrrr4444 commands. GGGGLLLL____MMMMAAAAPPPP1111____NNNNOOOORRRRMMMMAAAALLLL Each control point is three floating-point values representing the x, y, and z components of a normal vector. Internal ffffggggllllNNNNoooorrrrmmmmaaaallll commands are generated when the map is evaluated but the current normal is not updated with the value of these ffffggggllllNNNNoooorrrrmmmmaaaallll commands. GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____1111 Each control point is a single floating-point value representing the s texture coordinate. Internal ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd1111 commands are generated when the map is evaluated but the current texture coordinates are not updated with the value of these ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd commands. GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____2222 Each control point is two floating-point values representing the s and t texture coordinates. Internal ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd2222 commands are generated when the map is evaluated but the current texture coordinates are not updated with the value of these ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd commands. GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____3333 Each control point is three floating-point values representing the s, t, and r texture coordinates. Internal ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd3333 commands are generated when the map is evaluated but the current texture coordinates are not updated with the value of these ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd commands. GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____4444 Each control point is four floating-point values representing the s, t, r, and q texture coordinates. Internal ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd4444 commands are generated when the map is evaluated but the current texture coordinates are not updated with the value of these ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd commands. _s_t_r_i_d_e, _o_r_d_e_r, and _p_o_i_n_t_s define the array addressing for accessing the control points. _p_o_i_n_t_s is the location of the first control point, which occupies one, two, three, or four contiguous memory locations, depending on which map is being defined. _o_r_d_e_r is the number of control points in the array. _s_t_r_i_d_e specifies how many float or double locations to advance the internal memory pointer to reach the next control point. PPPPaaaaggggeeee 3333 ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ffffggggllllMMMMaaaapppp1111((((3333GGGG)))) NOTES As is the case with all GL commands that accept pointers to data, it is as if the contents of _p_o_i_n_t_s were copied by ffffggggllllMMMMaaaapppp1111 before ffffggggllllMMMMaaaapppp1111 returns. Changes to the contents of _p_o_i_n_t_s have no effect after ffffggggllllMMMMaaaapppp1111 is called. EEEERRRRRRRROOOORRRRSSSS GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_a_r_g_e_t is not an accepted value. GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _u_1 is equal to _u_2. GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_t_r_i_d_e is less than the number of values in a control point. GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _o_r_d_e_r is less than 1 or greater than the return value of GGGGLLLL____MMMMAAAAXXXX____EEEEVVVVAAAALLLL____OOOORRRRDDDDEEEERRRR. GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllMMMMaaaapppp1111 is executed between the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS ffffggggllllGGGGeeeettttMMMMaaaapppp ffffggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAAXXXX____EEEEVVVVAAAALLLL____OOOORRRRDDDDEEEERRRR ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____VVVVEEEERRRRTTTTEEEEXXXX____3333 ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____VVVVEEEERRRRTTTTEEEEXXXX____4444 ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____IIIINNNNDDDDEEEEXXXX ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____CCCCOOOOLLLLOOOORRRR____4444 ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____NNNNOOOORRRRMMMMAAAALLLL ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____1111 ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____2222 ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____3333 ffffggggllllIIIIssssEEEEnnnnaaaabbbblllleeeedddd with argument GGGGLLLL____MMMMAAAAPPPP1111____TTTTEEEEXXXXTTTTUUUURRRREEEE____CCCCOOOOOOOORRRRDDDD____4444 SSSSEEEEEEEE AAAALLLLSSSSOOOO ffffggggllllBBBBeeeeggggiiiinnnn, ffffggggllllCCCCoooolllloooorrrr, ffffggggllllEEEEnnnnaaaabbbblllleeee, ffffggggllllEEEEvvvvaaaallllCCCCoooooooorrrrdddd, ffffggggllllEEEEvvvvaaaallllMMMMeeeesssshhhh, ffffggggllllEEEEvvvvaaaallllPPPPooooiiiinnnntttt, ffffggggllllMMMMaaaapppp2222, ffffggggllllMMMMaaaappppGGGGrrrriiiidddd, ffffggggllllNNNNoooorrrrmmmmaaaallll, ffffggggllllTTTTeeeexxxxCCCCoooooooorrrrdddd, ffffggggllllVVVVeeeerrrrtttteeeexxxx PPPPaaaaggggeeee 4444